home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGASIC
/
CDITPDS2.LZH
/
DEMOM1.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-06-10
|
5KB
|
156 lines
DECLARE SUB PDTestSUB ()
'============================================================================
'DEMOM1.BAS Copyright (C) 1991, Clear Software. AL RIGHTS RESERVED.
'============================================================================
'$INCLUDE: 'CITOOLS.BI'
'$INCLUDE: 'CIMENU1.BI'
'$INCLUDE: 'CIMOUSE.BI'
'============================================================================
DEFINT A-Z
'============================================================================
CONST TRUE = -1, FALSE = 0
'============================================================================
PDTestSUB
'============================================================================
'Hide the mouse and clean up the screen before exiting.
'============================================================================
MouseHide
COLOR 7, 0
CLS
END
SUB PDTestSUB
'============================================================================
'Dimention the arrays for the pull down menu descriptions. Notice the
'dimentions are (1 TO 20).
'============================================================================
DIM pd1$(1 TO 20)
DIM pd2$(1 TO 20)
'============================================================================
'Initialize the mouse driver.
'============================================================================
MouseInit
'============================================================================
'Clear the screen and paint the background with the ScreenPaint SUB.
'============================================================================
CLS
COLOR 15, 1
ScreenPaint 1, 80, 1, 23, ""
'============================================================================
'Now set the menu definitions.
'============================================================================
PullDownDefine 1, 0, 1, "Options", 1
PullDownDefine 1, 1, 1, "Get The Heck Out Of Dodge", 1
PullDownDefine 1, 2, 1, "Beem Me Up Scotty", 9
PullDownDefine 1, 3, 1, "Frankly Scarlet,....", 1
PullDownDefine 1, 4, 1, "-", 1
PullDownDefine 1, 5, 1, "Exit", 2
PullDownDefine 2, 0, 1, "Foods", 1
PullDownDefine 2, 1, 1, "Green, Brown, and Yellow Stuff", 1
PullDownDefine 2, 2, 1, "Lima Beens", 1
PullDownDefine 2, 3, 1, "-", 1
PullDownDefine 2, 4, 1, "Prunes", 1
PullDownDefine 2, 5, 1, "Liver and Onions", 11
PullDownColors 15, 7, 1, 7, 1, 7, 11, 0, 8, 7, 15, 15
'============================================================================
'Set the area, colors and contents for the menu descriptions.
'============================================================================
PullDownTitleDescript "<Enter=Accept> <Arrow=Next Title> <Escape=Exit>"
PullDownDescriptArea 23, 2, 78, 0, 3
pd1$(1) = " Riding of into the sunset (watch for saddle sores)"
pd1$(2) = " You watch too much TV"
pd1$(3) = " You finish it"
pd1$(4) = ""
pd1$(5) = " Get rid of this screen and it's bad pun's"
PullDownDescript 1, pd1$()
pd2$(1) = " What they used to serve us in the school cafeteria"
pd2$(2) = " The human equivelent of furr balls"
pd2$(3) = ""
pd2$(4) = " One of the `Active' food groups"
pd2$(5) = " Mom's way of getting revenge"
PullDownDescript 2, pd2$()
'============================================================================
'Show the menu bar and turn on the mouse cursor.
'============================================================================
PullDownTitleOn
MouseShow
'============================================================================
'Enter the main loop and poll for a user event (mouse or keyboard). If one
'takes place then go to the PDGetMenuAction GOSUB to determin which menu
'choice was chosen.
'============================================================================
PDDONE = FALSE
WHILE NOT PDDONE
kb$ = PullDownPoll$
WHILE PullDownInfo(0)
GOSUB PDGetMenuAction
WEND
WEND
EXIT SUB
'============================================================================
'============================================================================
'FInd out which menu choice was chosen and act on it.
'============================================================================
PDGetMenuAction:
menu = PullDownInfo(1)
item = PullDownInfo(2)
SELECT CASE menu
CASE 1 'The first menu was chosen.
SELECT CASE item
CASE 1
CASE 5 'If Exit was chosen set the exit flag
PDDONE = TRUE 'to TRUE.
END SELECT
CASE 2 'The second menu was chosen.
END SELECT
RETURN
'============================================================================
END SUB